#include "systemmanage.h"
#include "ui_systemmanage.h"

SystemManage::SystemManage(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::SystemManage)
{
    ui->setupUi(this);
    connect(ui->buttonBox,SIGNAL(accepted()), this, SLOT(on_buttonBox_accepted()));
    connect(ui->buttonBox,SIGNAL(rejected()),this,SLOT(on_buttonBox_rejected()));
}

SystemManage::~SystemManage()
{
    delete ui;
}

void SystemManage::on_buttonBox_accepted()
{
    if(ui->userNameLineEdit->text().trimmed()!="super")
        return;
    if(ui->passwordLineEdit->text().trimmed()!="loncomip")
        return;
    this->close();
    return setResult(QDialog::Accepted);// this->accept();
}

void SystemManage::on_buttonBox_rejected()
{
    return this->reject();
}
